using System.Collections;
using System.Collections.Generic;
#if UNITY_EDITOR
using UnityEditor;

#endif
using UnityEngine;


public enum TestEnum
{
    [EnumAttirbute("甲")]
    A,
    [EnumAttirbute("乙")]
    B,
    [EnumAttirbute("丙")]
    C
}
[ExecuteInEditMode]
public class LabelDemo : MonoBehaviour
{
    [CNEnum(typeof(TestEnum),"中文枚举")]
    public TestEnum enum1;
    [Label("雾1")]
    public bool fog01 = true;
    // 雾 1
    [Label("雾浓度", "fog01")]
    [Range(0.0f, 0.05f)]
    public float fogDensity = 0.02f;  
    [Label("雾高度衰减系数", "fog01")]
    [Range(0.001f, 0.3f)]
    public float fogHeightFalloff = 0.2f;  
    [Label("雾高度", "fog01")]
    public float fogHeight = 0.0f;


#if UNITY_EDITOR
    [LchButton("我是给编辑器用的", "fog01")]
    public bool testButton  ;
#endif

    [Label("雾2")]
    public bool fog02 = true;
    [Label("雾浓度 2", "fog02")]
    [Range(0.0f, 0.05f)]
    public float fogDensity2 = 0.02f;
    [Label("雾高度衰减系数 2", "fog02")]
    [Range(0.001f, 0.3f)]
    public float fogHeightFalloff2 = 0.2f;
    [Label("雾高度 2", "fog02")]
    public float fogHeight2;

    [Label("hdr颜色")]
    [ColorUsage(true,true)]
    public Color fogInscatteringColor = new Color(0.447f, 0.639f, 1.0f);

    [Label("反向开关测试")]
    public bool op = true;
    [Label("开关关了你就见到我了", "!op")]
    public float val = 1;

 

    [LCHFishMap("鱼眼")]
    public Texture2D fishMap;

    /*[LchSH9Attribte("角色球谐", "roleSH")]
    public LchSH9 sh;


    [LchHDIRSH9Attribte("球谐HDIR" )]
    public LchSH9 sh2;

    [LchSH9ExAttribte("球谐工程")]
    public LchSH9Ex sh3;*/

    private void OnEnable()
    {
        //sh.Commint("_Role", "ENABLE_ROLE_SH");
    }
    private void OnDisable()
    {
        //sh.Disable("ENABLE_ROLE_SH");
    }

    private void LateUpdate()
    {
        #if UNITY_EDITOR
 
        if (testButton)
        {
            Debug.Log("按钮被点击了");
            
        }

        //sh.Commint("_Role", "ENABLE_ROLE_SH");
        //sh2.Commint("_New", null);
        #endif

    }



}
